/* Copyright (c) 2010 OFXKit
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

#import <Foundation/Foundation.h>

#import "OFXSecurity.h"
#import "OFXInvestmentTransaction.h"
#import "OFXInvestmentAccount.h"

@interface OFXInvestmentSellTransaction : OFXInvestmentTransaction {
  OFXSecurity* security;
  NSNumber* units;
  NSNumber* unitPrice;
  NSNumber* unitPriceMarkDown;
  NSNumber* commission;
  NSNumber* taxes;
  NSNumber* fees;
  NSNumber* load;
  NSNumber* withholding;
  NSNumber* stateWithholding;
  NSNumber* penaltyWithholding;
  NSNumber* taxExempt;
  NSNumber* totalAmount;
  NSNumber* gain;
  NSString* securitySubAccount;
  NSString* fundingSubAccount;
  NSString* loanId;
  NSString* penalty;
}

/**
 * @property security
 * @brief Security to sell
 */
@property(retain) OFXSecurity* security;

/**
 * @property units
 * @brief Number of units to sell.
 */
@property(retain) NSNumber* units;

/**
 * @property unitPrice
 * @brief Unit price
 */
@property(retain) NSNumber* unitPrice;

/**
 * @property unitPriceMarkDown
 * @brief Portion of the unit price that is attributed to the dealer markdown
 */
@property(retain) NSNumber* unitPriceMarkDown;

/**
 * @property commission
 * @brief Commission charged in transaction
 */
@property(retain) NSNumber* commission;

/**
 * @property taxes
 * @brief Taxes charged in transaction
 */
@property(retain) NSNumber* taxes;

/**
 * @property fees
 * @brief Other fees charged in transaction
 */
@property(retain) NSNumber* fees;

/**
 * @property load
 * @brief Load applied to transaction
 */
@property(retain) NSNumber* load;

/**
 * @property withholding
 * @brief Federal tax withholding amount.
 */
@property(retain) NSNumber* withholding;

/**
 * @property stateWithholding
 * @brief State tax withholding amount.
 */
@property(retain) NSNumber* stateWithholding;

/**
 * @property penaltyWithholding
 * @brief Tax penalty withholding
 */
@property(retain) NSNumber* penaltyWithholding;

/**
 * @property taxExempt
 * @brief Indicates if this transaction is tax exempt or not.
 */
@property(retain) NSNumber* taxExempt;

/**
 * @property totalAmount
 * @brief Total amount of transaction.
 */
@property(retain) NSNumber* totalAmount;

/**
 * @property gain
 * @brief Gain from sale of security
 */
@property(retain) NSNumber* gain;

/**
 * @property securitySubAccount
 * @brief Sub-account type for the security: CASH, MARGIN, SHORT, OTHER
 */
@property(retain) NSString* securitySubAccount;

/**
 * @property fundingSubAccount
 * @brief Where did the money for the transaction come from or go to?
 * 
 * Valid values:
 * - CASH
 * - MARGIN
 * - SHORT
 * - OTHER
 */
@property(retain) NSString* fundingSubAccount;

/**
 * @property loanId
 * @brief Unique identifier of loan
 */
@property(retain) NSString* loanId;

/**
 * @property penalty
 * @brief Indicates an amount withheld due to a penalty.
 */
@property(retain) NSString* penalty;

@end
